<template>
  <div class="home-footer-container">
    <div class="box">
      <div class="left">
        <div class="share">
          <!-- <button open-type="share" >
            <IconFont name="share" size="18"></IconFont>

            <div style="margin-top: 2px">分享</div>
          </button> -->
        </div>
        <div class="order" @click="skipOrder">
          <IconFont name="order" size="18"></IconFont>

          <div style="margin-top: 2px">我的订单</div>
        </div>
      </div>
      <div class="right">
        <nut-button block type="primary" @click="handleClick">立即购买</nut-button>
      </div>
    </div>
  </div>
</template>
<script setup>
import { IconFont } from "@nutui/icons-vue-taro";
import Taro from "@tarojs/taro";
import { useShareAppMessage } from "@tarojs/taro";

const emit = defineEmits(["onBuy"]);
const skipOrder = () => {
  Taro.navigateTo({
    url: "/pages/order/index",
  });
};
const handleClick = () => {
  emit("onBuy");
};
useShareAppMessage(() => {
  return {
    title: "电影《传说》专属·全国通兑券",
    page: `/pages/home/index`,
    imageUrl: "http://supportmaster.liangpiao.net.cn/chuanshuo.jpg",
  };
});
</script>
<style lang="scss">
.home-footer-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  //   height: 50px;
  background-color: #f7f8f9;
  padding: 20px 30px;

  .box {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .left {
      flex: 1;
      font-size: 24px;
      color: #858a99;
      display: flex;
      align-items: center;

      //   justify-content: space-between;
      .share {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
      }

      .order {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        margin-left: 60px;
      }
    }

    .right {
      flex: 1;
    }
  }
}
</style>
